package xyz.xuminghai.javafx_learn.scene.effect;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.effect.Shadow;
import javafx.scene.layout.BorderPane;
import javafx.scene.paint.Color;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;

/**
 * 2023/7/3 15:50 星期一<br/>
 * <p>
 * 模糊边缘
 *
 * @author xuMingHai
 */
public class ShadowApp extends Application {

    private final BorderPane root = new BorderPane();

    public static void main(String[] args) {
        Application.launch(args);
    }

    @Override
    public void init() {
        Circle circle = new Circle(50.0);
        Shadow shadow = new Shadow(50.0, Color.rgb(255, 78, 32));
        circle.setEffect(shadow);

        root.setCenter(circle);
    }


    public void start(Stage primaryStage) {
        primaryStage.setTitle(getClass().getSimpleName());
        Scene scene = new Scene(root, 800, 600);
        primaryStage.setScene(scene);
        primaryStage.show();
    }

}
